//
//  TodayMainCell.m
//  FoodList
//
//  Created by Jason on 16/4/7.
//  Copyright © 2016年 王金晶. All rights reserved.
//

#import "TodayMainCell.h"
#import <UIImageView+WebCache.h>

@implementation TodayMainCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    self.coverImg.layer.cornerRadius = 8;
    self.coverImg.layer.masksToBounds = YES;
    
}

- (void)setModel:(TodayModel *)model {
    _model = model;
    [self.coverImg sd_setImageWithURL:[NSURL URLWithString:model.imageUrl]];
    self.titleLab.text = model.name;
    self.authorLab.text = model.nickname;
    self.peiLiaoLab.text = model.ingredients;
    self.clickLab.text = [NSString stringWithFormat:@"%@次点击", model.hitscount];
    self.shareLab.text = [NSString stringWithFormat:@"%@个收藏", model.collectCount];
    self.assistLab.text = [NSString stringWithFormat:@"%@个赞", model.likeCount];
    self.commentLab.text = [NSString stringWithFormat:@"%ld条评论", model.commentCount];
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
